package com.fingard.dsp.bank.directbank.fngrd01.fgnet;

public class FgTcpReceiver {

    public byte[] recBytes;//reqBytes;

    public int contentLength;
    public int contentStartIndex;

    public int readedLength;
    //public String charsetName;

    public String sourceIP;
    public String connState;
    public String connMsg;
    public boolean isCompleted;

    public String getConnMsg() {
        if (connMsg != null && connMsg.length() > 0) {
            return connMsg;
        } else if (!isCompleted) {
            return "报文未正常接收完成";
        } else {
            return "";
        }
    }

    public FgTcpReceiver() {
        //charsetName = p_charsetName;
        reset();
    }

    public void reset() {
        contentLength = -1;
        contentStartIndex = 0;
        readedLength = 0;
        connState = "";
        connMsg = "";
        recBytes = null;
        isCompleted = false;
    }
}
